﻿using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.IBLL
{
    public interface IUserBLL
    {
        /// <summary>
        /// 添加用户信息
        /// </summary>
        /// <param name="logins"></param>
        /// <returns></returns>
        int AddUser(TBLogins logins);

        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="logins"></param>
        /// <returns></returns>
        OperResult Register(TBLogins logins);

        /// <summary>
        /// 通过用户名密码登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        OperResult<TBUsers> LoginByUserName(string userName, string password);

        /// <summary>
        /// 通过手机号密码登录
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        OperResult<TBUsers> LoginByMobile(string mobile, string password);

        /// <summary>
        /// 更新用户信息(不包含头像)
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        OperResult<TBUsers> EditUser(TBUsers user);

        /// <summary>
        /// 更新用户头像
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        OperResult<TBUsers> EditAvatar(TBUsers user);
    }
}
